package com.zl.cms.dao;

import com.zl.basic.dao.BaseDao;
import com.zl.cms.model.Role;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * User: zl email:c3tc3tc3t@126.com Date: 14-1-14 Time: 下午12:06
 */
@Repository("roleDao")
public class RoleDao extends BaseDao<Role> implements IRoleDao {
  @Override
  public List<Role> listRole() {
    return this.list("from Role");
  }

  @Override
  public void deleteRoleUsers(int rid) {
    this.updateByHql("delete UserRole where role.id=?", rid);
  }
}
